import 'package:flutter/material.dart';
import 'package:flutter_screenutil/screenutil.dart';

class DetailTopArea extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Column(
      children: <Widget>[
        _goodsImage('http://images.baixingliangfan.cn/firstCategoryPicture/20181212/20181212115842_9733.png'),
        _goodsName('商品名称'),
        _goodsNum('666')
      ],
    );
  }

  Widget _goodsImage(url) {
    return Image.network(
      url,
      width: ScreenUtil().setWidth(740),
    );
  }
  Widget _goodsName(name){
    return Container(
      width: ScreenUtil().setWidth(740),
      padding: EdgeInsets.only(left: 15),
      child: Text(
        name,
        style: TextStyle(
          fontSize: ScreenUtil().setSp(30),

        ),
      ),
    );
  }
  Widget _goodsNum(num) {
    return Container(
      width: ScreenUtil().setWidth(730),
      padding: EdgeInsets.only(left: 15),
      margin: EdgeInsets.only(top: 8),
      child: Row(
        children: <Widget>[
          Expanded(
            child: Text(
            '编号：${num}',
            style: TextStyle(
                color: Colors.black12,
            ),
           ),
          ),
          Expanded(
            child: Text(
            '价格：${num}',
            style: TextStyle(
                color: Colors.black12

            ),
          ),
          )


        ],
      )
    );
  }
}
